package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Travel;
import cn.wolfcode.trip.base.query.QueryObject;
import cn.wolfcode.trip.base.query.TravelQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TravelMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Travel record);

    Travel selectByPrimaryKey(Long id);

    List<Travel> selectAll();

    int updateByPrimaryKey(Travel travel);

    List<Travel> queryForList(TravelQueryObject qo);

    void updateState(Travel travel);

    //全局搜索数量
    int selectForCount(QueryObject qo);

    //全局搜素
    List<Travel> query(QueryObject qo);

    //点击浏览量
    void updateBrowseNum (Travel record);

    int selectTravelsNums(@Param("userId") Long userId);

}